---
layout: single
property_name: transition
---

<section id="transition" class="property property--shorthand">
  <header class="property-header">
    <nav class="property-links">
        <a class="property-collection" href="{{site.url}}/transitions/">
          In collection: <strong>transitions</strong>
        </a>
      <a class="property-links-direct" href="{{site.url}}/property/transition/" data-property-name="transition" data-tooltip="Single page for this property">Permalink</a>
      <a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="transition">Share</a>
        <a target="_blank" href="http://caniuse.com/#feat=css-transitions" data-tooltip="See on Can I use..." rel="external">Can I use</a>
      <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/transition" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
    </nav>
    <h2 class="property-name">
      <a href="#transition"><span>#</span>transition</a>
    </h2>
    <div class="property-description">
      <p>Shorthand property for <code class="shorthand"><a class="hash" href="{{site.url}}/property/transition-property" data-property-name="transition-property">transition-property</a></code> <code class="shorthand"><a class="hash" href="{{site.url}}/property/transition-duration" data-property-name="transition-duration">transition-duration</a></code> <code class="shorthand"><a class="hash" href="{{site.url}}/property/transition-timing-function" data-property-name="transition-timing-function">transition-timing-function</a></code>  and  <code class="shorthand"><a class="hash" href="{{site.url}}/property/transition-delay" data-property-name="transition-delay">transition-delay</a></code>.</p>
<p>Only <code>transition-duration</code> is <strong>required</strong>.</p>

    </div>

  </header>

    <style type="text/css">.transition { padding: 0; }</style>

    <style type="text/css">.transition:hover .square { background: hsl(348, 100%, 61%);color: #fff;transform: translateX(200%); }</style>



    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition: 1s;">transition: 1s;</code>
        </p>
        <div class="example-description">
          <ul><li><code>transition-duration</code> is <strong>set</strong> to <code>1s</code></li><li><code>transition-property</code> <em>defaults</em> to <code>all</code></li><li><code>transition-timing-function</code> <em>defaults</em> to <code>ease</code></li><li><code>transition-delay</code> <em>defaults</em> to <code>0s</code></li></ul>
        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition " id="transition-1s"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-1s .square { transition: 1s; }</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition: 1s linear;">transition: 1s linear;</code>
        </p>
        <div class="example-description">
          <ul><li><code>transition-duration</code> is <strong>set</strong> to <code>1s</code></li><li><code>transition-property</code> <em>defaults</em> to <code>all</code></li><li><code>transition-timing-function</code> is <strong>set</strong> to <code>linear</code></li><li><code>transition-delay</code> <em>defaults</em> to <code>0s</code></li></ul>
        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition " id="transition-1s-linear"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-1s-linear .square { transition: 1s linear; }</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition: background 1s linear;">transition: background 1s linear;</code>
        </p>
        <div class="example-description">
          <ul><li><code>transition-duration</code> is <strong>set</strong> to <code>1s</code></li><li><code>transition-property</code> is <strong>set</strong> to <code>background</code></li><li><code>transition-timing-function</code> is <strong>set</strong> to <code>linear</code></li><li><code>transition-delay</code> <em>defaults</em> to <code>0s</code></li></ul>
        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition " id="transition-background-1s-linear"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-background-1s-linear .square { transition: background 1s linear; }</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition: background 1s linear 500ms;">transition: background 1s linear 500ms;</code>
        </p>
        <div class="example-description">
          <ul><li><code>transition-duration</code> is <strong>set</strong> to <code>1s</code></li><li><code>transition-property</code> is <strong>set</strong> to <code>background</code></li><li><code>transition-timing-function</code> is <strong>set</strong> to <code>linear</code></li><li><code>transition-delay</code> is <strong>set</strong> to <code>500ms</code></li></ul>
        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition " id="transition-background-1s-linear-500ms"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-background-1s-linear-500ms .square { transition: background 1s linear 500ms; }</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="transition: background 4s, transform 1s;">transition: background 4s, transform 1s;</code>
        </p>
        <div class="example-description">
          <p>You can combine <strong>multiple properties</strong> with their own transition duration.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div transition " id="transition-background-4s-transform-1s"><p class="square square--alpha">Hover me</p></div>
        </div>
      </aside>
        <style type="text/css">#transition-background-4s-transform-1s .square { transition: background 4s, transform 1s; }</style>
    </section>

</section>
